import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use (VueRouter)

// 引入页面路由
import Login from '@/pages/Login'
import Home from '@/pages/Home'
import Register from '@/pages/Register'
import Search from '@/pages/Search'


export default new VueRouter({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/home',
      component: Home,
    },

    {
      path: '/register',
      component: Register
    },
    {
      path: '/search',
      component: Search
    }
  ]
})
